subroutine rhs(uu,Q)    !UU for Uij,Q for Qrhs
use var
implicit none

    real(8) uu(1+Klx:gridsx+krx,4)
    real(8) Q(1:gridsx,4)
    integer i,j,k
!$omp parallel private(i,j,k)
    !$omp do
    do i=1,gridsx
        do k=1,4
            Q(i,k)=(flux1(i,k)-flux1(i-1,k))/dx!+ (flux2(i,j,k)-flux2(i,j-1,k))/dy
            !write(*,'(I4,I4,2X,100(ES12.4,1X))') i, k, Q(i,k)
        !enddo
        !Q(i,j,2)=Q(i,j,2)-uu(i,j,1)*gx
        !Q(i,j,3)=Q(i,j,3)-uu(i,j,1)*gy
        !Q(i,j,4)=Q(i,j,4)-uu(i,j,2)*gx-uu(i,j,3)*gy
        !Q(i,j,5)=(gamma1(i,j,1)-gamma1(i-1,j,1))/dx+ (gamma2(i,j,1)-gamma2(i,j-1,1))/dy
        !print *,i
        enddo        
    enddo
    !$omp end do
!$omp end parallel
end subroutine rhs